<?php
/**
 * @Project: None
 * @FileName: RoleAttribute.php
 * @FilePath: D:\thinkphp6\tp\app\model\RoleAttribute.php
 * @Author: zishuiliufeng
 * @Date:   2021-01-28 17:35:51
 * @Last Modified by:   zishuiliufeng
 * @Last Modified time: 2021-01-30 22:33:30
 */

namespace app\model;

use think\Model;

class RoleAttribute extends Model
{
    protected $name = 'role_attribute';

    public function searchNameAttr($query, $value, $data){
        $query->$where('name', 'like', $value. '%');
    }

    public function searchIdAttr($query, $value, $data){
        $query->$where('id', '=', $value);
    }

    public function searchEnNameAttr($query, $value, $data){
        $query->$where('en_name', 'like', $value. '%');
    }
    
}